Haber2017 (GSE92332_mouse_small_intestine)

Annotate cell types

In [1]:
# load required modules
import scanpy as sc
import besca as bc
import pandas as pd
import numpy as np
import os
import pkg_resources

#import numpy as np
#from matplotlib import pyplot
#import sys

#setup document
sc.settings.verbosity = 3  # verbosity: errors (0), warnings (1), info (2), hints (3)
sc.settings.set_figure_params(dpi=80)  # low dpi (dots per inch) yields small inline figures
sc.logging.print_header()
scanpy==1.6.0 anndata==0.7.4 umap==0.3.10 numpy==1.17.4 scipy==1.5.1 pandas==1.0.5 scikit-learn==0.22 statsmodels==0.11.1 python-igraph==0.8.0 leidenalg==0.7.0
In [2]:
# define filepath (this is the folder that contains "raw" and "analyzed")
root_path = os.getcwd()

# input: results from standard workflow
analysis_name = 'standard_workflow_besca'
results_folder = os.path.join(root_path, 'analyzed', analysis_name)
input_data = os.path.join(results_folder, 'standard_workflow_besca.h5ad') # specify a .h5ad file for storing the results

# define output directories
outdir_data = results_folder
outdir_figures = os.path.join(results_folder, 'figures')
outdir_results = os.path.join(results_folder, 'results')
sc.settings.figdir = os.path.join(outdir_figures)

os.makedirs(outdir_data, exist_ok=True)
os.makedirs(outdir_figures, exist_ok=True)
os.makedirs(outdir_results, exist_ok=True)
In [3]:
#reload our data from previously written out AnnData object
adata = sc.read(input_data)
#adata = bc.datasets.Haber2017_processed()
In [4]:
adata = bc.st.additional_labeling(adata, 'leiden', 'leiden', 'Leiden clustering from standard workflow.', 'Klas Hatje', outdir_data)
ranking genes
    finished: added to `.uns['rank_genes_groups']`
    'names', sorted np.recarray to be indexed by group ids
    'scores', sorted np.recarray to be indexed by group ids
    'logfoldchanges', sorted np.recarray to be indexed by group ids
    'pvals', sorted np.recarray to be indexed by group ids
    'pvals_adj', sorted np.recarray to be indexed by group ids (0:00:15)
rank genes per label calculated using method wilcoxon.
mapping of cells to  leiden exported successfully to cell2labels.tsv
average.gct exported successfully to file
fract_pos.gct exported successfully to file
labelinfo.tsv successfully written out
/pstore/data/bi/reference/scseq/GSE92332_mouse_small_intestine/analyzed/standard_workflow_besca/labelings/leiden/WilxRank.gct written out
/pstore/data/bi/reference/scseq/GSE92332_mouse_small_intestine/analyzed/standard_workflow_besca/labelings/leiden/WilxRank.pvalues.gct written out
/pstore/data/bi/reference/scseq/GSE92332_mouse_small_intestine/analyzed/standard_workflow_besca/labelings/leiden/WilxRank.logFC.gct written out
In [5]:
adata
Out[5]:
AnnData object with n_obs × n_vars = 10896 × 1233
    obs: 'CELL', 'CONDITION', 'sample_type', 'donor', 'region', 'sample', 'percent_mito', 'n_counts', 'n_genes', 'batch', 'leiden'
    var: 'ENSEMBL', 'SYMBOL', 'n_cells', 'total_counts', 'frac_reads', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
    uns: 'hvg', 'leiden', 'leiden_colors', 'neighbors', 'pca', 'rank_genes_groups', 'region_colors', 'umap'
    obsm: 'X_pca', 'X_umap'
    varm: 'PCs'
    obsp: 'connectivities', 'distances'
In [6]:
adata.obs.head()
Out[6]:
CELL CONDITION sample_type donor region sample percent_mito n_counts n_genes batch leiden
haber_intestine_donor_M1_Duo.AAACATACAGCGGA haber_intestine_donor_M1_Duo.AAACATACAGCGGA healthy mouse_small_intestine_epithelial M1 Duo Duo_M1 0.001410 12768.0 1227 Duo 22
haber_intestine_donor_M1_Duo.AAACATACCTTACT haber_intestine_donor_M1_Duo.AAACATACCTTACT healthy mouse_small_intestine_epithelial M1 Duo Duo_M1 0.010779 6583.0 2156 Duo 3
haber_intestine_donor_M1_Duo.AAACCGTGCAGTCA haber_intestine_donor_M1_Duo.AAACCGTGCAGTCA healthy mouse_small_intestine_epithelial M1 Duo Duo_M1 0.022508 2799.0 1362 Duo 1
haber_intestine_donor_M1_Duo.AAACGCTGCAGTCA haber_intestine_donor_M1_Duo.AAACGCTGCAGTCA healthy mouse_small_intestine_epithelial M1 Duo Duo_M1 0.015041 6048.0 2287 Duo 9
haber_intestine_donor_M1_Duo.AAACGCTGCGTGAT haber_intestine_donor_M1_Duo.AAACGCTGCGTGAT healthy mouse_small_intestine_epithelial M1 Duo Duo_M1 0.023022 2780.0 1320 Duo 17
In [ ]:
 
In [7]:
%matplotlib inline  
sc.settings.set_figure_params(dpi=90)
In [8]:
sc.pl.umap(adata, color=['leiden', 'region'], legend_loc='on data', legend_fontsize=9)
In [9]:
sc.tl.tsne(adata)
sc.pl.tsne(adata, color=['leiden', 'region'], legend_loc='on data', legend_fontsize=9)
computing tSNE
    using 'X_pca' with n_pcs = 50
    using the 'MulticoreTSNE' package by Ulyanov (2017)
    finished: added
    'X_tsne', tSNE coordinates (adata.obsm) (0:01:13)
In [10]:
#sc.pl.umap(adata, color=['leiden', 'celltype'], legend_loc='on data', legend_fontsize=6)
In [11]:
#sc.pl.umap(adata, color=['Subtype'], legend_fontsize=9)
In [ ]:
 
In [12]:
### Perform DE cells of each Subtype vs. all other cells
DEgenes=bc.tl.dge.get_de(adata,'leiden',demethod='wilcoxon',topnr=5000, logfc=1,padj=0.05)
ranking genes
    finished: added to `.uns['rank_genes_groups']`
    'names', sorted np.recarray to be indexed by group ids
    'scores', sorted np.recarray to be indexed by group ids
    'logfoldchanges', sorted np.recarray to be indexed by group ids
    'pvals', sorted np.recarray to be indexed by group ids
    'pvals_adj', sorted np.recarray to be indexed by group ids (0:00:15)
In [13]:
### Select only top genes (in order of p-val) and plot expression per cell type
tops=list(DEgenes['12']['Name'][0:15])+list(DEgenes['13']['Name'][0:15])
#tops=list(DEgenes['Naive T cells']['Name'][0:30])
sc.pl.dotplot(adata, var_names=tops,groupby='leiden')
In [ ]:
 
In [14]:
#sc.pl.dotplot(adata, var_names=['SELL', 'CCR7', 'ID3', 'TCF7', 'LEF1', 'NELL2', 'PASK', 'FLT3LG', 'CAMK4', 'MAL'],groupby='Subtype')
In [ ]:
 
In [15]:
# Load GMT file and calculate signature scores
gmt_file_IMM=pkg_resources.resource_filename('besca', 'datasets/genesets/HumanCD45p_scseqCMs6.gmt')
gmt_file_anno=pkg_resources.resource_filename('besca', 'datasets/genesets/CellNames_scseqCMs6_sigs.gmt')
gmt_file_crypt=pkg_resources.resource_filename('besca', 'datasets/genesets/CryptScoreParikh2019.gmt')

mousehuman_file = pkg_resources.resource_filename('besca', 'datasets/homologs/MGItoHGNC.csv')

mousehuman=pd.read_csv(mousehuman_file,sep='\t',header='infer', encoding="unicode_escape")
mousehuman.index=mousehuman['MGI']
conversion=pd.Series(data=mousehuman['HGNC'], index=mousehuman.index)

adata_IMM_scores = adata.copy()
adata_anno_scores = adata.copy()
adata_crypt_scores = adata.copy()

bc.tl.sig.combined_signature_score(adata_IMM_scores, gmt_file_IMM, conversion=conversion)
bc.tl.sig.combined_signature_score(adata_anno_scores, gmt_file_anno, conversion=conversion)
bc.tl.sig.combined_signature_score(adata_crypt_scores, gmt_file_crypt, conversion=conversion)
computing score 'score_HumanCD45p_scseqCMs6_ActB_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Fcrl5', 'Ccr7', 'Cd40', 'Batf']
    finished: added
    'score_HumanCD45p_scseqCMs6_ActB_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Activation_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd69', 'Ccl5', 'Tnfrsf9']
    finished: added
    'score_HumanCD45p_scseqCMs6_Activation_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Basophil_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccr3', 'Cd69', 'Tlr4']
    finished: added
    'score_HumanCD45p_scseqCMs6_Basophil_scanpyUP', score of gene set (adata.obs).
    300 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Bcells_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd19', 'Ms4a1', 'Cd79a']
    finished: added
    'score_HumanCD45p_scseqCMs6_Bcells_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_CCG1S_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_CCG1S_scanpyUP', score of gene set (adata.obs).
    645 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_CCG2M_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_CCG2M_scanpyUP', score of gene set (adata.obs).
    550 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Cafs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Thy1', 'Dcn', 'Col1a1', 'Col1a2', 'Col6a1', 'Col6a2', 'Col6a3', 'Cxcl14', 'Lum', 'Col3a1', 'Dpt', 'Islr', 'Cd248', 'Mxra8']
    finished: added
    'score_HumanCD45p_scseqCMs6_Cafs_scanpyUP', score of gene set (adata.obs).
    49 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Cellcycle_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_Cellcycle_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Checkpoint_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tigit', 'Cd274', 'Lag3', 'Pdcd1', 'Havcr2']
    finished: added
    'score_HumanCD45p_scseqCMs6_Checkpoint_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Cyto_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ifng', 'Il4', 'Il6', 'Il10', 'Il13', 'Il16', 'Il21', 'Il22', 'Il1b', 'Gzmb', 'Prf1', 'Cxcl9', 'Cxcl10', 'Cxcl11', 'Cxcl12', 'Ccl2', 'Ccl3', 'Ccl5', 'Ccl7', 'Ccl11', 'Ccl17', 'NaN', 'Ccl22', 'Ccl24', 'Ccl8']
    finished: added
    'score_HumanCD45p_scseqCMs6_Cyto_scanpyUP', score of gene set (adata.obs).
    350 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Cytotox_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Nkg7', 'Gzmb', 'Gzmk', 'Gzma', 'Crtam', 'Cst7']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_DCR_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tlr8']
    finished: added
    'score_HumanCD45p_scseqCMs6_DCR_scanpyUP', score of gene set (adata.obs).
    349 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_DCrec_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tlr8']
    finished: added
    'score_HumanCD45p_scseqCMs6_DCrec_scanpyUP', score of gene set (adata.obs).
    349 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_DCs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccr2', 'Ccr7', 'Rnase6', 'Clec9a', 'Btla', 'Tlr7', 'Klrd1', 'Ccr7']
    finished: added
    'score_HumanCD45p_scseqCMs6_DCs_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Eff_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr3', 'Tbx21', 'Eomes', 'Prf1', 'Ccr10', 'Aqp3', 'Dusp2']
    finished: added
    'score_HumanCD45p_scseqCMs6_Eff_scanpyUP', score of gene set (adata.obs).
    49 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Endo_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd34', 'Cdh5', 'Eng', 'Flt4', 'Itgb3', 'Kdr', 'Mcam', 'Pecam1', 'Procr', 'Sele', 'Tek', 'Vcam1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Endo_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Endot_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd34', 'Cdh5', 'Flt4', 'Itgb3', 'Kdr', 'Mcam', 'Pecam1', 'Procr', 'Sele', 'Tek', 'Vcam1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Endot_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Endothelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Pecam1', 'Cdh5', 'Cldn5', 'Plvap', 'Mmrn1', 'Kdr', 'Tie1', 'Erg', 'Fabp4']
    finished: added
    'score_HumanCD45p_scseqCMs6_Endothelial_scanpyUP', score of gene set (adata.obs).
    198 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Eosinophil_scanpyUP'
WARNING: genes are not in var_names and ignored: ['C3ar1', 'C5ar1', 'Ccr1l1', 'Ccr3', 'Cd244a', 'Cd52', 'Cd53', 'Cxcr3', 'Fcer2a', 'Il9r', 'Itga4', 'Lair1', 'Ptgdr2', 'Gm5849', 'Siglece']
    finished: added
    'score_HumanCD45p_scseqCMs6_Eosinophil_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Epith_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_Epith_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_ExhB_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Nr4a3', 'Egr3', 'Nr4a1', 'Egr2']
    finished: added
    'score_HumanCD45p_scseqCMs6_ExhB_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Granulo_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Csf3r', 'Itgax', 'Gm5849', 'Hcar2', 'Clec4d', 'S100a8', 'Retn']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_HLA_scanpyUP'
WARNING: genes are not in var_names and ignored: ['H2-Eb2']
    finished: added
    'score_HumanCD45p_scseqCMs6_HLA_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_HLAP_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_HLAP_scanpyUP', score of gene set (adata.obs).
    498 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_HLAS_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_HLAS_scanpyUP', score of gene set (adata.obs).
    349 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Ifi_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Mx2', 'Ifitm7']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_Ifng_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcl9', 'Cxcl10', 'Ido1', 'Ifng']
    finished: added
    'score_HumanCD45p_scseqCMs6_Ifng_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Macrophage_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd86', 'Ccr1l1', 'Ccr5', 'Adgre1', 'C1qa', 'C1qb', 'Gm15922', 'Csf1r', 'Msr1', 'Gpr34']
    finished: added
    'score_HumanCD45p_scseqCMs6_Macrophage_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Mast_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_Mast_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Megakaryocytes_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr4', 'Gp1ba', 'Itga2b', 'Itgb3', 'Pecam1', 'Selp']
    finished: added
    'score_HumanCD45p_scseqCMs6_Megakaryocytes_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_MelMelan_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gm21983', 'Tyr', 'Slc45a2', 'Cdh19', 'Capn3', 'Gpm6b', 'S100b', 'Pax3', 'Mlana']
    finished: added
    'score_HumanCD45p_scseqCMs6_MelMelan_scanpyUP', score of gene set (adata.obs).
    300 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_MelMesen_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Rgs5', 'Bgn', 'Tnc', 'Igfbp6', 'Gfra2']
    finished: added
    'score_HumanCD45p_scseqCMs6_MelMesen_scanpyUP', score of gene set (adata.obs).
    499 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_MemB_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tnfrsf13b', 'Igha', 'Cd27', 'Cxcr3']
    finished: added
    'score_HumanCD45p_scseqCMs6_MemB_scanpyUP', score of gene set (adata.obs).
    250 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Memory_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Il7r', 'Cxcr4', 'Gpr183', 'Cd84']
    finished: added
    'score_HumanCD45p_scseqCMs6_Memory_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Mo14_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_Mo14_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Mo16_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Fcgr4']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_MoMa_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Fcgr2b', 'Fcgr4', 'Ccr1l1']
    finished: added
    'score_HumanCD45p_scseqCMs6_MoMa_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Monocytes_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Fcgr2b', 'Fcgr4', 'Gpr34', 'Ms4a7', 'Fcgr1', 'Msr1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Monocytes_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Myelo_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tyrobp', 'Ccr2', 'Cd34', 'Fcgr1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Myelo_scanpyUP', score of gene set (adata.obs).
    199 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_MyeloSubtype_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Siglech', 'Gm5849', 'S100a8', 'Cd80']
    finished: added
    'score_HumanCD45p_scseqCMs6_MyeloSubtype_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_NKT_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tyrobp', 'Fcer1g', 'Clic3']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_NKcells_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sh2d1b2', 'Il2rb', 'Trdc', 'Xcl1', 'Igfbp7', 'Ncr1', 'Il18rap']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_NKcyt_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd160', 'Spon2', 'Fcgr4', 'Cd247', 'Ccl4']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_NKnai_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Xcl1', 'Sell', 'Ccr7', 'Fut7']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_Naive_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sell', 'Ccr7', 'Lef1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Naive_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_NaiveB_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ighm', 'Tcl1', 'Sell', 'Fcer2a', 'Satb1', 'Btla']
    finished: added
    'score_HumanCD45p_scseqCMs6_NaiveB_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Neutrophil_scanpyUP'
WARNING: genes are not in var_names and ignored: ['C5ar1', 'Siglech', 'Csf3r', 'Cxcr1', 'Cxcr2', 'Fcgr1', 'Itgax']
    finished: added
    'score_HumanCD45p_scseqCMs6_Neutrophil_scanpyUP', score of gene set (adata.obs).
    249 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_NonEff_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd27', 'Cd28']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_OMyelo_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd34']
    finished: added
    'score_HumanCD45p_scseqCMs6_OMyelo_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Others_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tyrobp']
    finished: added
    'score_HumanCD45p_scseqCMs6_Others_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Plasma_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd79a', 'Igf1', 'Itga8']
    finished: added
    'score_HumanCD45p_scseqCMs6_Plasma_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Pyro_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_Pyro_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Stemmess_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cdh2', 'Loxl2']
    finished: added
    'score_HumanCD45p_scseqCMs6_Stemmess_scanpyUP', score of gene set (adata.obs).
    647 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_StemmessS_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_StemmessS_scanpyUP', score of gene set (adata.obs).
    199 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Stromal_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Icam2', 'Itga4', 'Madcam1', 'Mmp1a', 'Mmp2', 'Mmp9', 'Pdgfra', 'Pecam1', 'Thy1', 'Timp1', 'Tlr4', 'Vcam1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Stromal_scanpyUP', score of gene set (adata.obs).
    399 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_T4CM_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gpr183', 'Aqp3', 'Fut7', 'Cd84', 'Gpr171']
    finished: added
    'score_HumanCD45p_scseqCMs6_T4CM_scanpyUP', score of gene set (adata.obs).
    300 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TAM_scanpyUP'
WARNING: genes are not in var_names and ignored: ['C1qa', 'C1qb', 'Gpr34', 'C3', 'Cxcl12', 'Siglec1', 'Cd209c', 'F13a1', 'Msr1']
    finished: added
    'score_HumanCD45p_scseqCMs6_TAM_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TAMCx_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcl10', 'Cxcl11', 'Cxcl9']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_TEM_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tigit', 'Gzmk', 'Cd84', 'Cd27', 'Dusp2', 'Gpr171']
    finished: added
    'score_HumanCD45p_scseqCMs6_TEM_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TMO_scanpyUP'
WARNING: genes are not in var_names and ignored: ['S100a8', 'Gm5849', 'Vcan', 'Cd300e', 'Il1b']
    finished: added
    'score_HumanCD45p_scseqCMs6_TMO_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TMid_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Marco', 'Clec5a']
    finished: added
    'score_HumanCD45p_scseqCMs6_TMid_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TNK_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd2', 'Cd7', 'Lat', 'Cd6', 'Cd96', 'Lat', 'Cd247']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_TStem_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr5', 'Cxcr3', 'Pdcd1', 'Slamf6', 'Il18r1', 'Il7r']
    finished: added
    'score_HumanCD45p_scseqCMs6_TStem_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TStemhi_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr5', 'Cxcr3', 'Pdcd1', 'Slamf6', 'Il18r1', 'Il7r']
    finished: added
    'score_HumanCD45p_scseqCMs6_TStemhi_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TSteml_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd27', 'Cd28', 'Icos', 'Il2ra']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_TStemlo_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd27', 'Cd28', 'Icos', 'Il2ra']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_TTh1_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccr1l1', 'Ccr5', 'Cd4', 'Csf2', 'Cxcr3', 'Havcr2', 'Ifna9', 'Klrd1', 'Tnfsf11']
    finished: added
    'score_HumanCD45p_scseqCMs6_TTh1_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TTh17_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccr4', 'Ccr6', 'Cd4', 'Il17a', 'Il1r1', 'Il21', 'Il22', 'Klrb1f']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_TTh2_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccr3', 'Ccr4', 'Ccr7', 'Ccr8', 'Cd4', 'Csf2', 'Gata3', 'Timd2', 'Icos', 'Icos', 'Il10', 'Il13', 'Il1r1', 'Il4', 'Il5', 'Il6', 'Ptgdr2']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_Tcd4_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd4', 'Gpr183']
    finished: added
    'score_HumanCD45p_scseqCMs6_Tcd4_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Tcd8_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd8a', 'Cd8b1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_Tcells_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd3e', 'Cd3d', 'Cd3g', 'Trat1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Tcells_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Tcgd_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tcrg-C1', 'Trdc']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_Tcytox_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tcrg-C1', 'Klrd1', 'Fcgr4', 'Gzmb', 'Prf1', 'Spon2', 'Clic3']
    finished: added
    'score_HumanCD45p_scseqCMs6_Tcytox_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Teff_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd8a', 'Gzma', 'Gzmb', 'Ifng', 'Eomes', 'Cxcl9', 'Cxcl10', 'Tbx21', 'Cd274', 'Pdcd1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_Tfh_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Bcl6', 'Cd40lg', 'Cd84', 'Cxcr5', 'Icos', 'Pdcd1', 'Cd4']
    finished: added
    'score_HumanCD45p_scseqCMs6_Tfh_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_TilCM_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr6', 'Slc4a10', 'Il7r', 'Il18rap', 'Zbtb16', 'Cebpd', 'Slc4a10', 'Ccr2', 'Adam12', 'Klrb1f', 'Gzmk']
    finished: added
    'score_HumanCD45p_scseqCMs6_TilCM_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Tpexh_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Icos', 'Tnfsf14', 'Sell', 'Il7r', 'Lef1', 'Satb1', 'Bcl6', 'Cxcr5', 'Ccr7', 'Xcl1', 'Cxcl10']
    finished: added
    'score_HumanCD45p_scseqCMs6_Tpexh_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Treg_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Foxp3', 'Il2ra', 'Lrrc32']
    finished: added
    'score_HumanCD45p_scseqCMs6_Treg_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Ttexh_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Pdcd1', 'Havcr2', 'Lag3', 'Cd244a', 'Entpd1', 'Cd101', 'Tnfrsf9', 'Il2rb', 'Ifng', 'Il10', 'Gzma', 'Gzmb', 'Prf1', 'Prdm1', 'Runx3', 'Tbx21', 'Cxcr1', 'Ccl5', 'Ccl4', 'Ccl3', 'Csf1']
    finished: added
    'score_HumanCD45p_scseqCMs6_Ttexh_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_Ubi_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gm17087']
    finished: added
    'score_HumanCD45p_scseqCMs6_Ubi_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_UnivExh_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Nr4a3', 'Egr3', 'Nr4a1', 'Egr2']
    finished: added
    'score_HumanCD45p_scseqCMs6_UnivExh_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_UnivMem_scanpyUP'
    finished: added
    'score_HumanCD45p_scseqCMs6_UnivMem_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_UnivNaive_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sell']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_HumanCD45p_scseqCMs6_aDCs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccr7', 'Ccl22', 'Ccl17', 'Fscn1', 'NaN', 'Nudt17']
    finished: added
    'score_HumanCD45p_scseqCMs6_aDCs_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_allSteml_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Pdcd1', 'Cd28', 'Cxcr5', 'Il2ra', 'Havcr2', 'Slamf6', 'Il2rb', 'Gzmb', 'S1pr1', 'Cxcr3', 'Ifng', 'Il18r1', 'Cd244a', 'Il10', 'Entpd1']
    finished: added
    'score_HumanCD45p_scseqCMs6_allSteml_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_cDC1_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Clec9a', 'Batf3', 'Xcr1', 'Wdfy4', 'Clnk', 'Asb2']
    finished: added
    'score_HumanCD45p_scseqCMs6_cDC1_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_cDC2_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Clec10a', 'Fcer1a', 'Pkib']
    finished: added
    'score_HumanCD45p_scseqCMs6_cDC2_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_cDCs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Clec9a', 'Btla', 'Clec10a', 'Pkib', 'Xcr1']
    finished: added
    'score_HumanCD45p_scseqCMs6_cDCs_scanpyUP', score of gene set (adata.obs).
    300 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_epDCs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Klrd1']
    finished: added
    'score_HumanCD45p_scseqCMs6_epDCs_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_general_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ptprc', 'Gm17087', 'Bcl6']
    finished: added
    'score_HumanCD45p_scseqCMs6_general_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_moDC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Lypd2']
    finished: added
    'score_HumanCD45p_scseqCMs6_moDC_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_pDCs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tlr7', 'Lilra6', 'Runx2', 'Irf4', 'Clic3']
    finished: added
    'score_HumanCD45p_scseqCMs6_pDCs_scanpyUP', score of gene set (adata.obs).
    400 total control genes are used. (0:00:00)
computing score 'score_HumanCD45p_scseqCMs6_uDCs_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Klrd1', 'C7']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Bcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd19', 'Ms4a1', 'Tnfrsf13c', 'Cd22']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Fibroblast_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Col6a1', 'Mxra8', 'Acta2', 'Tagln', 'Bgn']
    finished: added
    'score_Fibroblast_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_Endothelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cdh5', 'Cldn5', 'Kdr', 'Tie1', 'Dnase1l3', 'Akap12', 'Ptprb', 'Stab2']
    finished: added
    'score_Endothelial_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_Epithelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Klk1b27']
    finished: added
    'score_Epithelial_scanpyUP', score of gene set (adata.obs).
    349 total control genes are used. (0:00:00)
computing score 'score_Granulocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Elane', 'Mpo', 'Prtn3', 'Ctsg', 'Ms4a3', 'Hdc']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_MelMelanoma_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gm21983', 'Tyr', 'Slc45a2', 'Cdh19', 'Capn3', 'Gpm6b', 'S100b', 'Pax3', 'Mlana']
    finished: added
    'score_MelMelanoma_scanpyUP', score of gene set (adata.obs).
    300 total control genes are used. (0:00:00)
computing score 'score_MemBcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tnfrsf13b', 'Igha']
    finished: added
    'score_MemBcell_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Myeloid_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Csf3r', 'Gm5849', 'Lilra6', 'Msr1', 'Marco', 'Mpo']
    finished: added
    'score_Myeloid_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_NKcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sh2d1b2', 'Ptgdr', 'Il2rb', 'Trdc', 'Xcl1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_NaiBcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ighm', 'Cd72', 'Tcl1', 'Fcer2a', 'Btla', 'Fcrl1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Neutrophil_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Elane', 'Mpo', 'Prtn3', 'Ctsg']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Plasma_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd79a', 'Itga8', 'Tnfrsf17', 'Pkhd1l1', 'Jsrp1']
    finished: added
    'score_Plasma_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_CD4Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd4', 'Trat1']
    finished: added
    'score_CD4Tcell_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_CD8Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd8a', 'Cd8b1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd3e', 'Cd3d', 'Cd3g', 'Trat1', 'Cd2']
    finished: added
    'score_Tcell_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_CD8Tcell_IL7Rmax_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr6', 'Slc4a10', 'Il7r', 'Il18rap', 'Zbtb16', 'Cebpd', 'Slc4a10', 'Ccr2', 'Adam12', 'Klrb1f', 'Gzmk']
    finished: added
    'score_CD8Tcell_IL7Rmax_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_CD4Tcell_IL7Rmax_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr6', 'Slc4a10', 'Il7r', 'Il18rap', 'Zbtb16', 'Cebpd', 'Slc4a10', 'Ccr2', 'Adam12', 'Klrb1f', 'Gzmk']
    finished: added
    'score_CD4Tcell_IL7Rmax_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_RegTcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Foxp3', 'Il2ra', 'Lrrc32']
    finished: added
    'score_RegTcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_cDC1_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Clec9a', 'Xcr1', 'Zfp366', 'Batf3']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_cDC2_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Enho', 'Clec10a', 'Fcer1a']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_cDC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Clec9a', 'Xcr1', 'Zfp366', 'Batf3', 'Ccl22', 'Ccl17', 'NaN', 'Nudt17', 'Enho', 'Clec10a', 'Axl', 'Gm15922']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_NClassMonocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Fcgr4']
    finished: added
    'score_NClassMonocyte_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_pDC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Clec4b2', 'Ptcra', 'Lamp5', 'Dntt', 'Ccr9', 'Cox6a2']
    finished: added
    'score_pDC_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_Hematopoietic_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ptprc', 'Coro1a', 'Cd53', 'Laptm5', 'Cxcr4']
    finished: added
    'score_Hematopoietic_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_Blymphocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd19', 'Ms4a1', 'Cd79a', 'Itga8', 'Iglc1', 'Pou2af1']
    finished: added
    'score_Blymphocyte_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_CD56dimNK_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd160', 'Spon2', 'Fcgr4', 'Ccl4', 'S1pr5']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_CD56brightNK_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Xcl1', 'Sell', 'Ccr7', 'Fut7']
    finished: added
    'score_CD56brightNK_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_NaiCD4Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sell', 'Ccr7', 'Lef1', 'Nell2', 'Camk4', 'Mal']
    finished: added
    'score_NaiCD4Tcell_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_NaiCD8Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sell', 'Ccr7', 'Lef1', 'Nell2', 'Camk4', 'Mal']
    finished: added
    'score_NaiCD8Tcell_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_ProlifCD8Tcell_scanpyUP'
    finished: added
    'score_ProlifCD8Tcell_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ProlifCD4Tcell_scanpyUP'
    finished: added
    'score_ProlifCD4Tcell_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ProlifBcell_scanpyUP'
    finished: added
    'score_ProlifBcell_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_CMCD4Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Pkia', 'Ap3m2', 'Aqp3']
    finished: added
    'score_CMCD4Tcell_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_EMCD8Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tigit', 'Gzmk', 'Cd84', 'Cd27', 'Dusp2', 'Gpr171']
    finished: added
    'score_EMCD8Tcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_EMCD4Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tigit', 'Gzmk', 'Cd84', 'Cd27', 'Dusp2', 'Gpr171']
    finished: added
    'score_EMCD4Tcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ClassMonocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Vcan']
    finished: added
    'score_ClassMonocyte_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Macrophage_MARCO_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Marco']
    finished: added
    'score_Macrophage_MARCO_scanpyUP', score of gene set (adata.obs).
    148 total control genes are used. (0:00:00)
computing score 'score_NKTcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd2', 'Cd7', 'Lat', 'Cd6', 'Cd96', 'Lat', 'Cd247']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_gdTcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tcrg-C1', 'Trdc', 'Tcrg-C1', 'Klrg1', 'Tcrg-C1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_CytotoxCD4Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tcrg-C1', 'Klrd1', 'Fcgr4', 'Gzmb', 'Prf1', 'Spon2', 'Clic3', 'Samd3']
    finished: added
    'score_CytotoxCD4Tcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_CytotoxCD8Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tcrg-C1', 'Klrd1', 'Fcgr4', 'Gzmb', 'Prf1', 'Spon2', 'Clic3', 'Samd3']
    finished: added
    'score_CytotoxCD8Tcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ExhCD8Tcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Pdcd1', 'Havcr2', 'Lag3', 'Cd244a', 'Entpd1', 'Cd101', 'Tnfrsf9', 'Il2rb', 'Ifng', 'Il10', 'Gzma', 'Gzmb', 'Prf1', 'Prdm1', 'Runx3', 'Tbx21', 'Cxcr1', 'Ccl5', 'Ccl4', 'Ccl3', 'Csf1']
    finished: added
    'score_ExhCD8Tcell_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_cDC_CCR7_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccl22', 'Ccl17', 'NaN', 'Nudt17', 'Ccr7']
    finished: added
    'score_cDC_CCR7_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Langerhans_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Klrd1']
    finished: added
    'score_Langerhans_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_Macrophage_MSR1_scanpyUP'
WARNING: genes are not in var_names and ignored: ['C1qa', 'Gpr34', 'C3', 'Cxcl12', 'Siglec1', 'Cd209c', 'F13a1', 'Msr1', 'Fcgr1']
    finished: added
    'score_Macrophage_MSR1_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_Macrophage_CXCL9_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcl10', 'Cxcl11', 'Cxcl9', 'Fcgr1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Monocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Lypd2', 'Vcan', 'Cd300e', 'Mmp9']
    finished: added
    'score_Monocyte_scanpyUP', score of gene set (adata.obs).
    199 total control genes are used. (0:00:00)
computing score 'score_ExhBcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Nr4a3', 'Egr3', 'Nr4a1', 'Egr2']
    finished: added
    'score_ExhBcell_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_Macrophage_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Msr1', 'Gpr34', 'Cd209c', 'Marco', 'Cxcl10', 'Cxcl11', 'Csf1r', 'Pou2f2']
    finished: added
    'score_Macrophage_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Hepatocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tat']
    finished: added
    'score_Hepatocyte_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_Erythrocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ermap', 'Car1']
    finished: added
    'score_Erythrocyte_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_AlphaPancreatic_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gc', 'Irx2']
    finished: added
    'score_AlphaPancreatic_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_BetaPancreatic_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ins1', 'Adcyap1', 'Mafa']
    finished: added
    'score_BetaPancreatic_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_DeltaPancreatic_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Lepr']
    finished: added
    'score_DeltaPancreatic_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_PPcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ppy', 'Stmn2', 'Fgb', 'Meis1']
    finished: added
    'score_PPcell_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_PancreaticDuctal_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cldn10', 'Slpi']
    finished: added
    'score_PancreaticDuctal_scanpyUP', score of gene set (adata.obs).
    349 total control genes are used. (0:00:00)
computing score 'score_PancreaticAcinar_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cpa1', 'Ctrb1', 'Ctrc', 'Klk1b27', 'Cel', 'Cela3b']
    finished: added
    'score_PancreaticAcinar_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_EpsilonPancreatic_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Frzb', 'Sptssb', 'Nnmt']
    finished: added
    'score_EpsilonPancreatic_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_PancStellate_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Rgs5', 'Notch3', 'Ndufa4l2', 'Ppp1r14a', 'Plac9b']
    finished: added
    'score_PancStellate_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_Cholangiocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tff1']
    finished: added
    'score_Cholangiocyte_scanpyUP', score of gene set (adata.obs).
    450 total control genes are used. (0:00:00)
computing score 'score_TAmplifying_scanpyUP'
    finished: added
    'score_TAmplifying_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_EntericGlial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Slc18a2', 'Aldh1a3', 'Foxd3', 'S100b']
    finished: added
    'score_EntericGlial_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_Adipocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Lep', 'Fabp4', 'Tcf21', 'Adipoq', 'P2rx5', 'Ucp1', 'Cidea', 'Lhx8']
    finished: added
    'score_Adipocyte_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Chondrocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Col6a1', 'Cytl1', 'Lum', 'Scrg1']
    finished: added
    'score_Chondrocyte_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_HematoMultipotentPC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tal1']
    finished: added
    'score_HematoMultipotentPC_scanpyUP', score of gene set (adata.obs).
    148 total control genes are used. (0:00:00)
computing score 'score_HematoStem_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Avp', 'Crhbp', 'Cd34']
    finished: added
    'score_HematoStem_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Basophil_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ms4a3', 'Hdc', 'Cpa3']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_CommonLymphoidPC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Dntt', 'Iglc1', 'Vpreb2']
    finished: added
    'score_CommonLymphoidPC_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ProBcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd72', 'Irf4', 'Tcl1']
    finished: added
    'score_ProBcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ImmaturecDC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Axl', 'Gm15922']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Schwann_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ngfr', 'S100b']
    finished: added
    'score_Schwann_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_Glial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Slc18a2', 'Aldh1a3', 'Foxd3', 'S100b', 'Ngfr']
    finished: added
    'score_Glial_scanpyUP', score of gene set (adata.obs).
    299 total control genes are used. (0:00:00)
computing score 'score_Paneth_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Nod2']
    finished: added
    'score_Paneth_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_InnateLymphoid_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cd7', 'Il2rb', 'Xcl1', 'Igfbp7', 'Ncr1', 'Klrd1', 'Prmt9', 'Gata3', 'Il1rl1', 'Il7r']
    finished: added
    'score_InnateLymphoid_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_HEVEndothelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Flt4', 'Ccl21a']
    finished: added
    'score_HEVEndothelial_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_VesselEndothelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Pecam1', 'Plvap', 'Cdh5']
    finished: added
    'score_VesselEndothelial_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_Pericyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sod3', 'Cspg4', 'Rgs5', 'Ndufa4l2', 'Cox4i2']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Myofibroblast_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Des', 'Actg2', 'Myh11']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_InflamFibroblast_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Mmp2', 'Il11', 'Rarres2', 'Nnmt']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_InflamMonocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccl3', 'Il1b', 'Camp']
    finished: added
    'score_InflamMonocyte_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_Neural_scanpyUP'
WARNING: genes are not in var_names and ignored: ['S100b', 'Gpm6b', 'Cryab']
    finished: added
    'score_Neural_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Enteroendocrine_scanpyUP'
    finished: added
    'score_Enteroendocrine_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_Goblet_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tff1', 'Klk1b27']
    finished: added
    'score_Goblet_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_Enterocyte_scanpyUP'
    finished: added
    'score_Enterocyte_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_FollicularBcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cxcr4', 'Bank1']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_GermCenterBcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Tcl1']
    finished: added
    'score_GermCenterBcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_Brush_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Azgp1']
    finished: added
    'score_Brush_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ImmatureEnterocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Aqp8']
    finished: added
    'score_ImmatureEnterocyte_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ImmatureGoblet_scanpyUP'
    finished: added
    'score_ImmatureGoblet_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_EnterocytePC_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Car1']
    finished: added
    'score_EnterocytePC_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_EpithelialStem_scanpyUP'
    finished: added
    'score_EpithelialStem_scanpyUP', score of gene set (adata.obs).
    249 total control genes are used. (0:00:00)
computing score 'score_IgAPlasma_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Igha', 'Igha', 'Jchain']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_IgGPlasma_scanpyUP'
WARNING: provided gene list has length 0, scores as 0
computing score 'score_IgMPlasma_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ighm', 'Tnfrsf17', 'Jchain']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_ILC1_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Il2rb', 'Xcl1', 'Igfbp7', 'Ncr1', 'Klrd1']
    finished: added
    'score_ILC1_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_ILC3_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Lst1', 'Prmt9']
    finished: added
    'score_ILC3_scanpyUP', score of gene set (adata.obs).
    99 total control genes are used. (0:00:00)
computing score 'score_ActTcell_scanpyUP'
    finished: added
    'score_ActTcell_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_NaiTcell_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Sell', 'Lef1', 'Nell2', 'Camk4']
    finished: added
    'score_NaiTcell_scanpyUP', score of gene set (adata.obs).
    149 total control genes are used. (0:00:00)
computing score 'score_McellGut_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ntrk2', 'Gm21983', 'Icam2', 'Tnfaip2']
    finished: added
    'score_McellGut_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Mast_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Cpa3', 'AW551984']
    finished: added
    'score_Mast_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ColorectalCancer_scanpyUP'
    finished: added
    'score_ColorectalCancer_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_T1Pneumocyte_scanpyUP'
    finished: added
    'score_T1Pneumocyte_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_T2Pneumocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Napsa', 'Sftpd']
    finished: added
    'score_T2Pneumocyte_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_Pneumocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Napsa', 'Sptb']
    finished: added
    'score_Pneumocyte_scanpyUP', score of gene set (adata.obs).
    200 total control genes are used. (0:00:00)
computing score 'score_Club_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Scgb1a1', 'Bpifb1', 'Tmem45a', 'Scgb3a2']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_CiliatedEpithelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Foxj1', 'Ccdc78']
    finished: added
    'score_CiliatedEpithelial_scanpyUP', score of gene set (adata.obs).
    199 total control genes are used. (0:00:00)
computing score 'score_Basal_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Krt5', 'Trp63']
WARNING: provided gene list has length 0, scores as 0
computing score 'score_Ionocyte_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Calca', 'Ascl1']
    finished: added
    'score_Ionocyte_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_ProlifMonocyte_scanpyUP'
    finished: added
    'score_ProlifMonocyte_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ILC2_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gata3', 'Il2ra', 'Il1rl1', 'Il7r']
    finished: added
    'score_ILC2_scanpyUP', score of gene set (adata.obs).
    100 total control genes are used. (0:00:00)
computing score 'score_ProlifMyeloid_scanpyUP'
    finished: added
    'score_ProlifMyeloid_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ProlifcDC_scanpyUP'
    finished: added
    'score_ProlifcDC_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_Mesothelial_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Ccdc80', 'Upk3b', 'Pla2g2a', 'Prg4', 'Calb2']
    finished: added
    'score_Mesothelial_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_Platelet_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Gp1ba', 'Gp9', 'Itga2b', 'Itgb3', 'Ppbp']
    finished: added
    'score_Platelet_scanpyUP', score of gene set (adata.obs).
    50 total control genes are used. (0:00:00)
computing score 'score_ProlifTAmplifying_scanpyUP'
    finished: added
    'score_ProlifTAmplifying_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ProlifEpithelialStem_scanpyUP'
    finished: added
    'score_ProlifEpithelialStem_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_ProlifEnterocytePC_scanpyUP'
    finished: added
    'score_ProlifEnterocytePC_scanpyUP', score of gene set (adata.obs).
    150 total control genes are used. (0:00:00)
computing score 'score_CryptScoreParikh2019_scanpyUP'
WARNING: genes are not in var_names and ignored: ['Selenop', 'Dhrs9', 'Pkib']
    finished: added
    'score_CryptScoreParikh2019_scanpyUP', score of gene set (adata.obs).
    348 total control genes are used. (0:00:00)
In [16]:
adata_anno_scores
Out[16]:
AnnData object with n_obs × n_vars = 10896 × 1233
    obs: 'CELL', 'CONDITION', 'sample_type', 'donor', 'region', 'sample', 'percent_mito', 'n_counts', 'n_genes', 'batch', 'leiden', 'score_Bcell_scanpy', 'score_Fibroblast_scanpy', 'score_Endothelial_scanpy', 'score_Epithelial_scanpy', 'score_Granulocyte_scanpy', 'score_MelMelanoma_scanpy', 'score_MemBcell_scanpy', 'score_Myeloid_scanpy', 'score_NKcell_scanpy', 'score_NaiBcell_scanpy', 'score_Neutrophil_scanpy', 'score_Plasma_scanpy', 'score_CD4Tcell_scanpy', 'score_CD8Tcell_scanpy', 'score_Tcell_scanpy', 'score_CD8Tcell_IL7Rmax_scanpy', 'score_CD4Tcell_IL7Rmax_scanpy', 'score_RegTcell_scanpy', 'score_cDC1_scanpy', 'score_cDC2_scanpy', 'score_cDC_scanpy', 'score_NClassMonocyte_scanpy', 'score_pDC_scanpy', 'score_Hematopoietic_scanpy', 'score_Blymphocyte_scanpy', 'score_CD56dimNK_scanpy', 'score_CD56brightNK_scanpy', 'score_NaiCD4Tcell_scanpy', 'score_NaiCD8Tcell_scanpy', 'score_ProlifCD8Tcell_scanpy', 'score_ProlifCD4Tcell_scanpy', 'score_ProlifBcell_scanpy', 'score_CMCD4Tcell_scanpy', 'score_EMCD8Tcell_scanpy', 'score_EMCD4Tcell_scanpy', 'score_ClassMonocyte_scanpy', 'score_Macrophage_MARCO_scanpy', 'score_NKTcell_scanpy', 'score_gdTcell_scanpy', 'score_CytotoxCD4Tcell_scanpy', 'score_CytotoxCD8Tcell_scanpy', 'score_ExhCD8Tcell_scanpy', 'score_cDC_CCR7_scanpy', 'score_Langerhans_scanpy', 'score_Macrophage_MSR1_scanpy', 'score_Macrophage_CXCL9_scanpy', 'score_Monocyte_scanpy', 'score_ExhBcell_scanpy', 'score_Macrophage_scanpy', 'score_Hepatocyte_scanpy', 'score_Erythrocyte_scanpy', 'score_AlphaPancreatic_scanpy', 'score_BetaPancreatic_scanpy', 'score_DeltaPancreatic_scanpy', 'score_PPcell_scanpy', 'score_PancreaticDuctal_scanpy', 'score_PancreaticAcinar_scanpy', 'score_EpsilonPancreatic_scanpy', 'score_PancStellate_scanpy', 'score_Cholangiocyte_scanpy', 'score_TAmplifying_scanpy', 'score_EntericGlial_scanpy', 'score_Adipocyte_scanpy', 'score_Chondrocyte_scanpy', 'score_HematoMultipotentPC_scanpy', 'score_HematoStem_scanpy', 'score_Basophil_scanpy', 'score_CommonLymphoidPC_scanpy', 'score_ProBcell_scanpy', 'score_ImmaturecDC_scanpy', 'score_Schwann_scanpy', 'score_Glial_scanpy', 'score_Paneth_scanpy', 'score_InnateLymphoid_scanpy', 'score_HEVEndothelial_scanpy', 'score_VesselEndothelial_scanpy', 'score_Pericyte_scanpy', 'score_Myofibroblast_scanpy', 'score_InflamFibroblast_scanpy', 'score_InflamMonocyte_scanpy', 'score_Neural_scanpy', 'score_Enteroendocrine_scanpy', 'score_Goblet_scanpy', 'score_Enterocyte_scanpy', 'score_FollicularBcell_scanpy', 'score_GermCenterBcell_scanpy', 'score_Brush_scanpy', 'score_ImmatureEnterocyte_scanpy', 'score_ImmatureGoblet_scanpy', 'score_EnterocytePC_scanpy', 'score_EpithelialStem_scanpy', 'score_IgAPlasma_scanpy', 'score_IgGPlasma_scanpy', 'score_IgMPlasma_scanpy', 'score_ILC1_scanpy', 'score_ILC3_scanpy', 'score_ActTcell_scanpy', 'score_NaiTcell_scanpy', 'score_McellGut_scanpy', 'score_Mast_scanpy', 'score_ColorectalCancer_scanpy', 'score_T1Pneumocyte_scanpy', 'score_T2Pneumocyte_scanpy', 'score_Pneumocyte_scanpy', 'score_Club_scanpy', 'score_CiliatedEpithelial_scanpy', 'score_Basal_scanpy', 'score_Ionocyte_scanpy', 'score_ProlifMonocyte_scanpy', 'score_ILC2_scanpy', 'score_ProlifMyeloid_scanpy', 'score_ProlifcDC_scanpy', 'score_Mesothelial_scanpy', 'score_Platelet_scanpy', 'score_ProlifTAmplifying_scanpy', 'score_ProlifEpithelialStem_scanpy', 'score_ProlifEnterocytePC_scanpy'
    var: 'ENSEMBL', 'SYMBOL', 'n_cells', 'total_counts', 'frac_reads', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
    uns: 'hvg', 'leiden', 'leiden_colors', 'neighbors', 'pca', 'rank_genes_groups', 'region_colors', 'umap'
    obsm: 'X_pca', 'X_umap', 'X_tsne'
    varm: 'PCs'
    obsp: 'connectivities', 'distances'
In [17]:
adata_IMM_scores
Out[17]:
AnnData object with n_obs × n_vars = 10896 × 1233
    obs: 'CELL', 'CONDITION', 'sample_type', 'donor', 'region', 'sample', 'percent_mito', 'n_counts', 'n_genes', 'batch', 'leiden', 'score_HumanCD45p_scseqCMs6_ActB_scanpy', 'score_HumanCD45p_scseqCMs6_Activation_scanpy', 'score_HumanCD45p_scseqCMs6_Basophil_scanpy', 'score_HumanCD45p_scseqCMs6_Bcells_scanpy', 'score_HumanCD45p_scseqCMs6_CCG1S_scanpy', 'score_HumanCD45p_scseqCMs6_CCG2M_scanpy', 'score_HumanCD45p_scseqCMs6_Cafs_scanpy', 'score_HumanCD45p_scseqCMs6_Cellcycle_scanpy', 'score_HumanCD45p_scseqCMs6_Checkpoint_scanpy', 'score_HumanCD45p_scseqCMs6_Cyto_scanpy', 'score_HumanCD45p_scseqCMs6_Cytotox_scanpy', 'score_HumanCD45p_scseqCMs6_DCR_scanpy', 'score_HumanCD45p_scseqCMs6_DCrec_scanpy', 'score_HumanCD45p_scseqCMs6_DCs_scanpy', 'score_HumanCD45p_scseqCMs6_Eff_scanpy', 'score_HumanCD45p_scseqCMs6_Endo_scanpy', 'score_HumanCD45p_scseqCMs6_Endot_scanpy', 'score_HumanCD45p_scseqCMs6_Endothelial_scanpy', 'score_HumanCD45p_scseqCMs6_Eosinophil_scanpy', 'score_HumanCD45p_scseqCMs6_Epith_scanpy', 'score_HumanCD45p_scseqCMs6_ExhB_scanpy', 'score_HumanCD45p_scseqCMs6_Granulo_scanpy', 'score_HumanCD45p_scseqCMs6_HLA_scanpy', 'score_HumanCD45p_scseqCMs6_HLAP_scanpy', 'score_HumanCD45p_scseqCMs6_HLAS_scanpy', 'score_HumanCD45p_scseqCMs6_Ifi_scanpy', 'score_HumanCD45p_scseqCMs6_Ifng_scanpy', 'score_HumanCD45p_scseqCMs6_Macrophage_scanpy', 'score_HumanCD45p_scseqCMs6_Mast_scanpy', 'score_HumanCD45p_scseqCMs6_Megakaryocytes_scanpy', 'score_HumanCD45p_scseqCMs6_MelMelan_scanpy', 'score_HumanCD45p_scseqCMs6_MelMesen_scanpy', 'score_HumanCD45p_scseqCMs6_MemB_scanpy', 'score_HumanCD45p_scseqCMs6_Memory_scanpy', 'score_HumanCD45p_scseqCMs6_Mo14_scanpy', 'score_HumanCD45p_scseqCMs6_Mo16_scanpy', 'score_HumanCD45p_scseqCMs6_MoMa_scanpy', 'score_HumanCD45p_scseqCMs6_Monocytes_scanpy', 'score_HumanCD45p_scseqCMs6_Myelo_scanpy', 'score_HumanCD45p_scseqCMs6_MyeloSubtype_scanpy', 'score_HumanCD45p_scseqCMs6_NKT_scanpy', 'score_HumanCD45p_scseqCMs6_NKcells_scanpy', 'score_HumanCD45p_scseqCMs6_NKcyt_scanpy', 'score_HumanCD45p_scseqCMs6_NKnai_scanpy', 'score_HumanCD45p_scseqCMs6_Naive_scanpy', 'score_HumanCD45p_scseqCMs6_NaiveB_scanpy', 'score_HumanCD45p_scseqCMs6_Neutrophil_scanpy', 'score_HumanCD45p_scseqCMs6_NonEff_scanpy', 'score_HumanCD45p_scseqCMs6_OMyelo_scanpy', 'score_HumanCD45p_scseqCMs6_Others_scanpy', 'score_HumanCD45p_scseqCMs6_Plasma_scanpy', 'score_HumanCD45p_scseqCMs6_Pyro_scanpy', 'score_HumanCD45p_scseqCMs6_Stemmess_scanpy', 'score_HumanCD45p_scseqCMs6_StemmessS_scanpy', 'score_HumanCD45p_scseqCMs6_Stromal_scanpy', 'score_HumanCD45p_scseqCMs6_T4CM_scanpy', 'score_HumanCD45p_scseqCMs6_TAM_scanpy', 'score_HumanCD45p_scseqCMs6_TAMCx_scanpy', 'score_HumanCD45p_scseqCMs6_TEM_scanpy', 'score_HumanCD45p_scseqCMs6_TMO_scanpy', 'score_HumanCD45p_scseqCMs6_TMid_scanpy', 'score_HumanCD45p_scseqCMs6_TNK_scanpy', 'score_HumanCD45p_scseqCMs6_TStem_scanpy', 'score_HumanCD45p_scseqCMs6_TStemhi_scanpy', 'score_HumanCD45p_scseqCMs6_TSteml_scanpy', 'score_HumanCD45p_scseqCMs6_TStemlo_scanpy', 'score_HumanCD45p_scseqCMs6_TTh1_scanpy', 'score_HumanCD45p_scseqCMs6_TTh17_scanpy', 'score_HumanCD45p_scseqCMs6_TTh2_scanpy', 'score_HumanCD45p_scseqCMs6_Tcd4_scanpy', 'score_HumanCD45p_scseqCMs6_Tcd8_scanpy', 'score_HumanCD45p_scseqCMs6_Tcells_scanpy', 'score_HumanCD45p_scseqCMs6_Tcgd_scanpy', 'score_HumanCD45p_scseqCMs6_Tcytox_scanpy', 'score_HumanCD45p_scseqCMs6_Teff_scanpy', 'score_HumanCD45p_scseqCMs6_Tfh_scanpy', 'score_HumanCD45p_scseqCMs6_TilCM_scanpy', 'score_HumanCD45p_scseqCMs6_Tpexh_scanpy', 'score_HumanCD45p_scseqCMs6_Treg_scanpy', 'score_HumanCD45p_scseqCMs6_Ttexh_scanpy', 'score_HumanCD45p_scseqCMs6_Ubi_scanpy', 'score_HumanCD45p_scseqCMs6_UnivExh_scanpy', 'score_HumanCD45p_scseqCMs6_UnivMem_scanpy', 'score_HumanCD45p_scseqCMs6_UnivNaive_scanpy', 'score_HumanCD45p_scseqCMs6_aDCs_scanpy', 'score_HumanCD45p_scseqCMs6_allSteml_scanpy', 'score_HumanCD45p_scseqCMs6_cDC1_scanpy', 'score_HumanCD45p_scseqCMs6_cDC2_scanpy', 'score_HumanCD45p_scseqCMs6_cDCs_scanpy', 'score_HumanCD45p_scseqCMs6_epDCs_scanpy', 'score_HumanCD45p_scseqCMs6_general_scanpy', 'score_HumanCD45p_scseqCMs6_moDC_scanpy', 'score_HumanCD45p_scseqCMs6_pDCs_scanpy', 'score_HumanCD45p_scseqCMs6_uDCs_scanpy'
    var: 'ENSEMBL', 'SYMBOL', 'n_cells', 'total_counts', 'frac_reads', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
    uns: 'hvg', 'leiden', 'leiden_colors', 'neighbors', 'pca', 'rank_genes_groups', 'region_colors', 'umap'
    obsm: 'X_pca', 'X_umap', 'X_tsne'
    varm: 'PCs'
    obsp: 'connectivities', 'distances'
In [18]:
adata_crypt_scores
Out[18]:
AnnData object with n_obs × n_vars = 10896 × 1233
    obs: 'CELL', 'CONDITION', 'sample_type', 'donor', 'region', 'sample', 'percent_mito', 'n_counts', 'n_genes', 'batch', 'leiden', 'score_CryptScoreParikh2019_scanpy'
    var: 'ENSEMBL', 'SYMBOL', 'n_cells', 'total_counts', 'frac_reads', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
    uns: 'hvg', 'leiden', 'leiden_colors', 'neighbors', 'pca', 'rank_genes_groups', 'region_colors', 'umap'
    obsm: 'X_pca', 'X_umap', 'X_tsne'
    varm: 'PCs'
    obsp: 'connectivities', 'distances'
In [19]:
sc.pl.umap(adata_IMM_scores, color=['score_HumanCD45p_scseqCMs6_Cellcycle_scanpy',
                                    'score_HumanCD45p_scseqCMs6_CCG1S_scanpy',
                                    'score_HumanCD45p_scseqCMs6_CCG2M_scanpy',
                                    'score_HumanCD45p_scseqCMs6_Stemmess_scanpy',
                                    ], legend_loc='on data',legend_fontsize=6)
In [20]:
sc.pl.umap(adata_anno_scores, color=['score_Epithelial_scanpy',
                                     'score_Fibroblast_scanpy',
                                     'score_Endothelial_scanpy',
                                     'score_Hematopoietic_scanpy',
                                    ], legend_loc='on data',legend_fontsize=6)
In [21]:
sc.pl.umap(adata_anno_scores, color=['score_Paneth_scanpy',
                                     'score_Brush_scanpy', # Tuft cells
                                     'score_Enteroendocrine_scanpy' # EEC
                                    ], legend_loc='on data',legend_fontsize=6)
In [22]:
sc.pl.umap(adata_anno_scores, color=['score_EpithelialStem_scanpy',
                                     'score_TAmplifying_scanpy',
                                     'score_ImmatureGoblet_scanpy',
                                     'score_Goblet_scanpy',
                                    ], legend_loc='on data',legend_fontsize=6)
In [23]:
sc.pl.umap(adata_anno_scores, color=['score_EpithelialStem_scanpy',
                                     'score_EnterocytePC_scanpy', # Enterocyte progenitor cell
                                     'score_ImmatureEnterocyte_scanpy',
                                     'score_Enterocyte_scanpy'], legend_loc='on data',legend_fontsize=6)
In [24]:
sc.pl.umap(adata_anno_scores, color=['score_TAmplifying_scanpy',
                                     'score_ProlifTAmplifying_scanpy',
                                    ], legend_loc='on data',legend_fontsize=6)
In [25]:
sc.pl.umap(adata_crypt_scores, color=['score_CryptScoreParikh2019_scanpy'], legend_loc='on data',legend_fontsize=6)
In [26]:
sc.pl.umap(adata,color=['Alpi','Apoa1','Apoa4','Fabp1']) ## enterocyte
In [27]:
sc.pl.umap(adata,color=['Muc2','Tff3','Agr2']) ## goblet
In [28]:
sc.pl.umap(adata,color=['Chga','Chgb','Tac1','Neurog3','Tph1']) ## enteroendocrine
In [29]:
sc.pl.umap(adata,color=['Ascl2','Slc12a2','Axin2','Olfm4','Gkn3','Lgr5']) ## progenitor
In [30]:
sc.pl.umap(adata,color=['Dclk1','Trpm5','Gfi1b','Il25']) ## Tuft/Brush
In [31]:
sc.pl.umap(adata,color=['Epcam','Krt18','Krt19']) ## Epithelial

Generate UMAPs for all signatures

In [32]:
scores = [x for x in adata_anno_scores.obs.columns if 'scanpy' in x]
sc.pl.umap(adata_anno_scores, color=scores, color_map='viridis')

Compare to signature decision tree based annotation

In [33]:
from itertools import repeat

gmt_file_anno=pkg_resources.resource_filename('besca', 'datasets/genesets/CellNames_scseqCMs6_sigs.gmt')
mousehuman_homologs=pkg_resources.resource_filename('besca', 'datasets/homologs/MGItoHGNC.csv')

mousehuman=pd.read_csv(mousehuman_homologs, sep='\t',header='infer', encoding="unicode_escape")
mousehuman.index=mousehuman['MGI']
conversion = pd.Series(data=mousehuman.HGNC, index=mousehuman.index)

mymarkers = bc.tl.sig.read_GMT_sign(gmt_file_anno,directed=False)

for signature in mymarkers.keys():
    mymarkers[signature] = [i for i in map(bc.tl.sig._helper._to_geneid, repeat(conversion), mymarkers[signature]) if i is not None]

mymarkers = bc.tl.sig.filter_siggenes(adata, mymarkers) ### remove genes not present in dataset or empty signatures
mymarkers['Ubi'] = ['B2m','Actb'] ### used for cutoff adjustment - Gapdh not highly expressed in mouse
In [34]:
sc.pl.umap(adata,color=mymarkers['EpithelialStem'])
In [35]:
sc.pl.umap(adata,color=mymarkers['TAmplifying'])
In [36]:
sc.pl.umap(adata,color=mymarkers['EnterocytePC'])
In [ ]:
 
In [37]:
configfile=pkg_resources.resource_filename('besca', 'datasets/genesets/CellNames_scseqCMs6_config.mouse.tsv')

sigconfig,levsk=bc.tl.sig.read_annotconfig(configfile)
In [38]:
print(sigconfig.loc["Epithelial","Cutoff"])
print(sigconfig.loc["Paneth","Cutoff"])
print(sigconfig.loc["Goblet","Cutoff"])
print(sigconfig.loc["ImmatureGoblet","Cutoff"])
print(sigconfig.loc["Enterocyte","Cutoff"])
print(sigconfig.loc["EnterocytePC","Cutoff"])
print(sigconfig.loc["ImmatureEnterocyte","Cutoff"])
print(sigconfig.loc["TAmplifying","Cutoff"])
print(sigconfig.loc["ProlifTAmplifying","Cutoff"])
print(sigconfig.loc["EpithelialStem","Cutoff"])
2.5
2.0
1.5
2.0
2.5
1.5
1.5
2.0
2.5
2.0
In [39]:
sigconfig.loc["Epithelial","Cutoff"]=1.0
#sigconfig.loc["Paneth","Cutoff"]=2.0
sigconfig.loc["Goblet","Cutoff"]=1.8
sigconfig.loc["ImmatureGoblet","Cutoff"]=1.3
#sigconfig.loc["Enterocyte","Cutoff"]=2.5
sigconfig.loc["EnterocytePC","Cutoff"]=2.75
#sigconfig.loc["ProlifEnterocytePC","Cutoff"]=2.0
#sigconfig.loc["ImmatureEnterocyte","Cutoff"]=1.5
#sigconfig.loc["TAmplifying","Cutoff"]=2.0
#sigconfig.loc["ProlifTAmplifying","Cutoff"]=2.5
#sigconfig.loc["EpithelialStem","Cutoff"]=2.0
#sigconfig.loc["ProlifEpithelialStem","Cutoff"]=2.0
In [40]:
# Fract_pos was exported by BESCA in the standard worflow
f=pd.read_csv(results_folder + "/labelings/leiden/fract_pos.gct",sep="\t",skiprows=2)
df=bc.tl.sig.score_mw(f,mymarkers)
myc=np.median(df.loc['Ubi',:]*0.5) ### Set a cutoff based on Ubi and scale with values from config file

# Cluster attribution based on cutoff
df=df.drop('Ubi')
In [41]:
sigscores={}
for mysig in list(df.index):
    sigscores[mysig]=bc.tl.sig.getset(df,mysig,sigconfig.loc[mysig,'Cutoff']*myc)
    #sigscores[mysig]=bc.tl.sig.getset(df,mysig,10)
In [42]:
sigscores
Out[42]:
{'Fibroblast': set(),
 'Endothelial': set(),
 'Epithelial': {'0',
  '1',
  '10',
  '11',
  '12',
  '13',
  '14',
  '15',
  '16',
  '17',
  '18',
  '19',
  '2',
  '20',
  '21',
  '22',
  '23',
  '24',
  '25',
  '26',
  '27',
  '28',
  '29',
  '3',
  '30',
  '31',
  '32',
  '33',
  '34',
  '35',
  '36',
  '37',
  '38',
  '4',
  '5',
  '6',
  '7',
  '8',
  '9'},
 'MelMelanoma': set(),
 'Myeloid': {'13', '32', '34', '35'},
 'CD8Tcell_IL7Rmax': set(),
 'CD4Tcell_IL7Rmax': set(),
 'RegTcell': set(),
 'NClassMonocyte': set(),
 'pDC': set(),
 'Hematopoietic': set(),
 'Blymphocyte': set(),
 'NaiCD4Tcell': set(),
 'NaiCD8Tcell': set(),
 'ProlifCD8Tcell': set(),
 'ProlifCD4Tcell': set(),
 'ProlifBcell': {'1',
  '10',
  '11',
  '12',
  '14',
  '19',
  '20',
  '21',
  '22',
  '24',
  '25',
  '28',
  '29',
  '7',
  '9'},
 'CMCD4Tcell': set(),
 'EMCD8Tcell': set(),
 'EMCD4Tcell': set(),
 'Macrophage_MARCO': set(),
 'CytotoxCD4Tcell': set(),
 'CytotoxCD8Tcell': set(),
 'ExhCD8Tcell': set(),
 'Langerhans': set(),
 'Macrophage_MSR1': {'33'},
 'Monocyte': set(),
 'ExhBcell': set(),
 'Hepatocyte': set(),
 'Erythrocyte': set(),
 'AlphaPancreatic': set(),
 'BetaPancreatic': set(),
 'DeltaPancreatic': {'35'},
 'PancreaticDuctal': {'0',
  '1',
  '10',
  '11',
  '12',
  '13',
  '14',
  '15',
  '16',
  '17',
  '18',
  '19',
  '2',
  '20',
  '22',
  '24',
  '25',
  '26',
  '27',
  '28',
  '29',
  '31',
  '32',
  '33',
  '34',
  '35',
  '36',
  '37',
  '38',
  '4',
  '5',
  '6',
  '7',
  '8',
  '9'},
 'PancreaticAcinar': set(),
 'PancStellate': set(),
 'Cholangiocyte': {'0',
  '13',
  '16',
  '22',
  '26',
  '27',
  '32',
  '33',
  '34',
  '35',
  '36',
  '37',
  '38',
  '4',
  '5',
  '8'},
 'TAmplifying': {'1',
  '11',
  '12',
  '14',
  '15',
  '16',
  '17',
  '19',
  '2',
  '20',
  '24',
  '25',
  '38',
  '6',
  '7',
  '8',
  '9'},
 'EntericGlial': set(),
 'Chondrocyte': set(),
 'HematoMultipotentPC': set(),
 'CommonLymphoidPC': set(),
 'ProBcell': set(),
 'Schwann': set(),
 'Glial': set(),
 'Paneth': {'22', '26', '33', '37'},
 'InnateLymphoid': set(),
 'VesselEndothelial': set(),
 'InflamMonocyte': set(),
 'Neural': set(),
 'Enteroendocrine': {'32', '35', '36'},
 'Goblet': {'0'},
 'Enterocyte': {'23', '3', '30'},
 'GermCenterBcell': {'0',
  '1',
  '10',
  '13',
  '16',
  '18',
  '19',
  '2',
  '22',
  '26',
  '27',
  '28',
  '32',
  '33',
  '34',
  '35',
  '36',
  '37',
  '38',
  '4',
  '5',
  '7',
  '8',
  '9'},
 'Brush': {'18'},
 'ImmatureEnterocyte': {'22', '23', '3', '30', '31'},
 'ImmatureGoblet': {'0', '10', '26', '34', '37', '5'},
 'EnterocytePC': {'0', '13', '15', '21', '24', '29', '3', '30', '31', '38'},
 'EpithelialStem': {'1', '13', '16', '2', '27', '28', '33', '4', '7', '8'},
 'ILC3': set(),
 'ActTcell': {'1',
  '10',
  '11',
  '12',
  '13',
  '14',
  '16',
  '17',
  '19',
  '2',
  '20',
  '21',
  '22',
  '24',
  '25',
  '27',
  '28',
  '29',
  '32',
  '33',
  '34',
  '36',
  '38',
  '4',
  '6',
  '7',
  '8',
  '9'},
 'NaiTcell': set(),
 'Mast': set(),
 'ColorectalCancer': set(),
 'T1Pneumocyte': set(),
 'T2Pneumocyte': set(),
 'Pneumocyte': set(),
 'CiliatedEpithelial': set(),
 'ProlifMonocyte': {'1',
  '10',
  '11',
  '12',
  '14',
  '19',
  '20',
  '21',
  '22',
  '24',
  '25',
  '28',
  '29',
  '7',
  '9'},
 'ILC2': set(),
 'ProlifMyeloid': set(),
 'ProlifcDC': set(),
 'ProlifTAmplifying': {'12', '14', '20', '24', '29', '7'},
 'ProlifEpithelialStem': {'1',
  '10',
  '12',
  '14',
  '19',
  '20',
  '21',
  '22',
  '24',
  '25',
  '29',
  '7',
  '9'},
 'ProlifEnterocytePC': {'1',
  '10',
  '12',
  '14',
  '19',
  '20',
  '21',
  '22',
  '24',
  '25',
  '29',
  '7',
  '9'}}
In [43]:
sc.pl.umap(adata, color=['leiden'], legend_loc='on data')
In [44]:
### One can choose to exclude certain cell types not relevant for the analysed sample 
### or which go too much into detail for the current resolution
#toexclude=['AlphaPancreatic', 'BetaPancreatic', 'DeltaPancreatic', 'PPcell', 'PancreaticDuctal', 'PancreaticAcinar', 
#           'EpsilonPancreatic', 'PancStellate', 'Cholangiocyte', 'Erythrocyte', 'Hematopoietic']
toexclude=['AlphaPancreatic', 'BetaPancreatic', 'DeltaPancreatic', 'PPcell', 'PancreaticDuctal', 'PancreaticAcinar', 
           'EpsilonPancreatic', 'PancStellate', 'Cholangiocyte','Hepatocyte']
In [45]:
cnames=bc.tl.sig.make_anno(df,sigscores,sigconfig,levsk, 'celltype',toexclude)
In [46]:
cnames
Out[46]:
celltype0 celltype1 celltype2 celltype3
4 Epithelial EpithelialStem EpithelialStem EpithelialStem
3 Epithelial Enterocyte Enterocyte Enterocyte
20 Epithelial TAmplifying ProlifTAmplifying ProlifTAmplifying
29 Epithelial EnterocytePC ProlifEnterocytePC ProlifEnterocytePC
5 Epithelial ImmatureGoblet ImmatureGoblet ImmatureGoblet
16 Epithelial EpithelialStem EpithelialStem EpithelialStem
25 Epithelial TAmplifying TAmplifying TAmplifying
6 Epithelial TAmplifying TAmplifying TAmplifying
9 Epithelial TAmplifying TAmplifying TAmplifying
14 Epithelial TAmplifying ProlifTAmplifying ProlifTAmplifying
18 Epithelial Brush Brush Brush
0 Epithelial Goblet Goblet Goblet
21 Epithelial EnterocytePC ProlifEnterocytePC ProlifEnterocytePC
30 Epithelial Enterocyte Enterocyte Enterocyte
32 Epithelial Enteroendocrine Enteroendocrine Enteroendocrine
22 Epithelial Paneth Paneth Paneth
27 Epithelial EpithelialStem EpithelialStem EpithelialStem
24 Epithelial EnterocytePC ProlifEnterocytePC ProlifEnterocytePC
36 Epithelial Enteroendocrine Enteroendocrine Enteroendocrine
33 Epithelial Paneth Paneth Paneth
17 Epithelial TAmplifying TAmplifying TAmplifying
38 Epithelial EnterocytePC EnterocytePC EnterocytePC
10 Epithelial ImmatureGoblet ImmatureGoblet ImmatureGoblet
34 Epithelial ImmatureGoblet ImmatureGoblet ImmatureGoblet
15 Epithelial EnterocytePC EnterocytePC EnterocytePC
26 Epithelial Paneth Paneth Paneth
31 Epithelial ImmatureEnterocyte ImmatureEnterocyte ImmatureEnterocyte
12 Epithelial TAmplifying ProlifTAmplifying ProlifTAmplifying
11 Epithelial TAmplifying TAmplifying TAmplifying
28 Epithelial EpithelialStem EpithelialStem EpithelialStem
8 Epithelial EpithelialStem EpithelialStem EpithelialStem
2 Epithelial EpithelialStem EpithelialStem EpithelialStem
1 Epithelial EpithelialStem ProlifEpithelialStem ProlifEpithelialStem
19 Epithelial TAmplifying TAmplifying TAmplifying
35 Epithelial Enteroendocrine Enteroendocrine Enteroendocrine
13 Epithelial EpithelialStem EpithelialStem EpithelialStem
7 Epithelial EpithelialStem ProlifEpithelialStem ProlifEpithelialStem
37 Epithelial Paneth Paneth Paneth
23 Epithelial Enterocyte Enterocyte Enterocyte
In [ ]:
 
In [47]:
adata.obs['celltype0']=bc.tl.sig.add_anno(adata,cnames,'celltype0','leiden')
adata.obs['celltype1']=bc.tl.sig.add_anno(adata,cnames,'celltype1','leiden')
adata.obs['celltype2']=bc.tl.sig.add_anno(adata,cnames,'celltype2','leiden')
adata.obs['celltype3']=bc.tl.sig.add_anno(adata,cnames,'celltype3','leiden')
In [48]:
sc.pl.umap(adata,color=['celltype1'])
In [49]:
sc.pl.umap(adata,color=['celltype3'])
In [50]:
#sc.pl.umap(adata, color=['Subtype'])
In [51]:
sc.pl.umap(adata, color=['celltype0','celltype1', 'leiden'], legend_loc='on data',legend_fontsize=6)
sc.pl.umap(adata, color=['celltype2','celltype3', 'leiden'], legend_loc='on data',legend_fontsize=6)
In [52]:
#sc.pl.umap(adata, color=['dblabel','celltype', 'leiden'], legend_loc='on data',legend_fontsize=6)
#sc.pl.umap(adata, color=['cluster_celltype'], legend_loc='on data',legend_fontsize=6)
In [53]:
### transform these short forms to dblabel - EFO standard nomenclature
celltype_nomenclature=pkg_resources.resource_filename('besca', 'datasets/nomenclature/CellTypes_v1.tsv')
nomenclature=pd.read_csv(celltype_nomenclature,sep='\t',header=0,skiprows=range(1, 2))
#tmp=nomenclature.loc[0,:].copy(); tmp[0]=tmp[1]="unknown"; tmp[2]="NCL:0001"; tmp[3]="Unknown"
#nomenclature=nomenclature.append(tmp)

cnamesDBlabel=[]
for mycol in list(cnames.columns):
    cnamesDBlabel.append([list(nomenclature.loc[nomenclature['short_dblabel']==x,'dblabel'])[0] for x in list(cnames[mycol])])
cnamesDBlabel=pd.DataFrame(cnamesDBlabel).transpose()
cnamesDBlabel.columns=cnames.columns
cnamesDBlabel.index=cnames.index
In [54]:
clusters='leiden'
adata.obs['celltype0']=bc.tl.sig.add_anno(adata,cnamesDBlabel,'celltype0',clusters)
adata.obs['celltype1']=bc.tl.sig.add_anno(adata,cnamesDBlabel,'celltype1',clusters)
adata.obs['celltype2']=bc.tl.sig.add_anno(adata,cnamesDBlabel,'celltype2',clusters)
adata.obs['celltype3']=bc.tl.sig.add_anno(adata,cnamesDBlabel,'celltype3',clusters)
In [55]:
### dblabel
adata.obs['dblabel']=adata.obs['celltype3']
In [56]:
#results_file
adata.write(input_data+'.annotated.h5ad')
In [57]:
marker_genes = dict()
marker_genes['Stem'] = ['Lgr5', 'Ascl2', 'Slc12a2', 'Axin2', 'Olfm4', 'Gkn3']
marker_genes['Enterocyte (Proximal)'] = ['Gsta1','Rbp2','Adh6a','Apoa4','Reg3a','Creb3l3','Cyp3a13','Cyp2d26','Ms4a10','Ace','Aldh1a1','Rdh7','H2-Q2', 'Hsd17b6','Gstm3','Gda','Apoc3','Gpd1','Fabp1','Slc5a1','Mme','Cox7a1','Gsta4','Lct','Khk','Mttp','Xdh','Sult1b1', 'Treh','Lpgat1','Dhrs1','Cyp2c66','Ephx2','Cyp2c65','Cyp3a25','Slc2a2','Ugdh','Gstm6','Retsat','Ppap2a','Acsl5', 'Cyb5r3','Cyb5b','Ckmt1','Aldob','Ckb','Scp2','Prap1']
marker_genes['Enterocyte (Distal)'] = ['Tmigd1','Fabp6','Slc51b','Slc51a','Mep1a','Fam151a','Naaladl1','Slc34a2','Plb1','Nudt4','Dpep1','Pmp22','Xpnpep2','Muc3','Neu1','Clec2h','Phgr1','2200002D01Rik','Prss30','Cubn','Plec','Fgf15','Crip1','Krt20','Dhcr24','Myo15b','Amn','Enpep','Anpep','Slc7a9','Ocm','Anxa2','Aoc1','Ceacam20','Arf6','Abcb1a','Xpnpep1','Vnn1','Cndp2','Nostrin','Slc13a1','Aspa','Maf','Myh14']
marker_genes['Goblet'] = ['Agr2', 'Fcgbp', 'Tff3', 'Clca1', 'Zg16', 'Tpsg1', 'Muc2', 'Galnt12', 'Atoh1', 'Rep15', 'S100a6', 'Pdia5', 'Klk1', 'Pla2g10', 'Spdef', 'Lrrc26', 'Ccl9', 'Bace2', 'Bcas1', 'Slc12a8', 'Smim14', 'Tspan13', 'Txndc5', 'Creb3l4', 'C1galt1c1', 'Creb3l1', 'Qsox1', 'Guca2a', 'Scin', 'Ern2', 'AW112010', 'Fkbp11', 'Capn9', 'Stard3nl', 'Slc50a1', 'Sdf2l1', 'Hgfa', 'Galnt7', 'Hpd', 'Ttc39a', 'Tmed3', 'Pdia6', 'Uap1', 'Gcnt3', 'Tnfaip8', 'Dnajc10', 'Ergic1', 'Tsta3', 'Kdelr3', 'Foxa3', 'Tpd52', 'Tmed9', 'Spink4', 'Nans', 'Cmtm7', 'Creld2', 'Tm9sf3', 'Wars', 'Smim6', 'Manf', 'Oit1', 'Tram1', 'Kdelr2', 'Xbp1', 'Serp1', 'Vimp', 'Guk1', 'Sh3bgrl3', 'Cmpk1', 'Tmsb10', 'Dap', 'Ostc', 'Ssr4', 'Sec61b', 'Pdia3', 'Gale', 'Klf4', 'Krtcap2', 'Arf4', 'Sep15', 'Ssr2', 'Ramp1', 'Calr', 'Ddost']
marker_genes['Paneth'] = ['Gm15284', 'AY761184', 'Defa17', 'Gm14851', 'Defa22', 'Defa-rs1', 'Defa3', 'Defa24', 'Defa26', 'Defa21', 'Lyz1', 'Gm15292', 'Mptx2', 'Ang4']
marker_genes['Enteroendocrine'] = ['Chgb', 'Gfra3', 'Cck', 'Vwa5b2', 'Neurod1', 'Fev', 'Aplp1', 'Scgn', 'Neurog3', 'Resp18', 'Trp53i11', 'Bex2', 'Rph3al', 'Scg5', 'Pcsk1', 'Isl1', 'Maged1', 'Fabp5', 'Celf3', 'Pcsk1n', 'Fam183b', 'Prnp', 'Tac1', 'Gpx3', 'Cplx2', 'Nkx2-2', 'Olfm1', 'Vim', 'Rimbp2', 'Anxa6', 'Scg3', 'Ngfrap1', 'Insm1', 'Gng4', 'Pax6', 'Cnot6l', 'Cacna2d1', 'Tox3', 'Slc39a2', 'Riiad1']
marker_genes['Tuft'] = ['Alox5ap', 'Lrmp', 'Hck', 'Avil', 'Rgs13', 'Ltc4s', 'Trpm5', 'Dclk1', 'Spib', 'Fyb', 'Ptpn6', 'Matk', 'Snrnp25', 'Sh2d7', 'Ly6g6f', 'Kctd12', '1810046K07Rik', 'Hpgds', 'Tuba1a', 'Pik3r5', 'Vav1', 'Tspan6', 'Skap2', 'Pygl', 'Ccdc109b', 'Ccdc28b', 'Plcg2', 'Ly6g6d', 'Alox5', 'Pou2f3', 'Gng13', 'Bmx', 'Ptpn18', 'Nebl', 'Limd2', 'Pea15a', 'Tmem176a', 'Smpx', 'Itpr2', 'Il13ra1', 'Siglecf', 'Ffar3', 'Rac2', 'Hmx2', 'Bpgm', 'Inpp5j', 'Ptgs1', 'Aldh2', 'Pik3cg', 'Cd24a', 'Ethe1', 'Inpp5d', 'Krt23', 'Gprc5c', 'Reep5', 'Csk', 'Bcl2l14', 'Tmem141', 'Coprs', 'Tmem176b', '1110007C09Rik', 'Ildr1', 'Galk1', 'Zfp428', 'Rgs2', 'Inpp5b', 'Gnai2', 'Pla2g4a', 'Acot7', 'Rbm38', 'Gga2', 'Myo1b', 'Adh1', 'Bub3', 'Sec14l1', 'Asah1', 'Ppp3ca', 'Agt', 'Gimap1', 'Krt18', 'Pim3', '2210016L21Rik', 'Tmem9', 'Lima1', 'Fam221a', 'Nt5c3', 'Atp2a3', 'Mlip', 'Vdac3', 'Ccdc23', 'Tmem45b', 'Cd47', 'Lect2', 'Pla2g16', 'Mocs2', 'Arpc5', 'Ndufaf3']
In [58]:
sc.tl.rank_genes_groups(adata, groupby='leiden', key_added='rank_genes')
WARNING: Default of the method has been changed to 't-test' from 't-test_overestim_var'
ranking genes
    finished: added to `.uns['rank_genes']`
    'names', sorted np.recarray to be indexed by group ids
    'scores', sorted np.recarray to be indexed by group ids
    'logfoldchanges', sorted np.recarray to be indexed by group ids
    'pvals', sorted np.recarray to be indexed by group ids
    'pvals_adj', sorted np.recarray to be indexed by group ids (0:00:06)
In [59]:
cell_annotation = sc.tl.marker_gene_overlap(adata, marker_genes, key='rank_genes')
cell_annotation
Out[59]:
0 1 2 3 4 5 6 7 8 9 ... 29 30 31 32 33 34 35 36 37 38
Stem 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 ... 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0
Enterocyte (Proximal) 47.0 47.0 47.0 47.0 47.0 47.0 47.0 47.0 47.0 47.0 ... 47.0 47.0 47.0 47.0 47.0 47.0 47.0 47.0 47.0 47.0
Enterocyte (Distal) 44.0 44.0 44.0 44.0 44.0 44.0 44.0 44.0 44.0 44.0 ... 44.0 44.0 44.0 44.0 44.0 44.0 44.0 44.0 44.0 44.0
Goblet 83.0 83.0 83.0 83.0 83.0 83.0 83.0 83.0 83.0 83.0 ... 83.0 83.0 83.0 83.0 83.0 83.0 83.0 83.0 83.0 83.0
Paneth 14.0 14.0 14.0 14.0 14.0 14.0 14.0 14.0 14.0 14.0 ... 14.0 14.0 14.0 14.0 14.0 14.0 14.0 14.0 14.0 14.0
Enteroendocrine 40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0 ... 40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0
Tuft 95.0 95.0 95.0 95.0 95.0 95.0 95.0 95.0 95.0 95.0 ... 95.0 95.0 95.0 95.0 95.0 95.0 95.0 95.0 95.0 95.0

7 rows × 39 columns

In [60]:
import seaborn as sb
cell_annotation_norm = sc.tl.marker_gene_overlap(adata, marker_genes, key='rank_genes', normalize='reference')
sb.heatmap(cell_annotation_norm)
Out[60]:
<AxesSubplot:>
In [61]:
cell_annotation_norm
Out[61]:
0 1 2 3 4 5 6 7 8 9 ... 29 30 31 32 33 34 35 36 37 38
Stem 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
Enterocyte (Proximal) 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 ... 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167 0.979167
Enterocyte (Distal) 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
Goblet 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 ... 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095 0.988095
Paneth 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
Enteroendocrine 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
Tuft 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 ... 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381 0.979381

7 rows × 39 columns

In [62]:
sc.pl.umap(adata,color=[g for g in marker_genes['Stem'] if g in adata.raw.var_names])
In [ ]:
 
In [63]:
data_file_pub = './GSE92332_Regional_UMIcounts.txt'

adata_pub = sc.read(data_file_pub, cache=True)
adata_pub = adata_pub.transpose()
... reading from cache file cache/GSE92332_Regional_UMIcounts.h5ad
In [64]:
# Annotate the data sets
adata_pub.obs['barcode'] = [a.split('_')[0] for a in adata_pub.obs_names]
adata_pub.obs['region'] = [a.split('_')[1] for a in adata_pub.obs_names]
adata_pub.obs['donor'] = [a.split('_')[2].upper() for a in adata_pub.obs_names]
adata_pub.obs['cell_label'] = [a.split('_')[3] for a in adata_pub.obs_names]
In [65]:
#Cell type annotation from publication
print(adata_pub.shape)
adata_pub.obs['cell_label'].value_counts()
(11665, 27998)
Out[65]:
Stem               3679
TA                 2311
EP                 1957
Goblet             1559
Enterocyte         1041
Paneth              529
Enteroendocrine     324
Tuft                265
Name: cell_label, dtype: int64
In [66]:
#Our cell type labels
print(adata.shape)
adata.obs['celltype3'].value_counts()
(10896, 1233)
Out[66]:
epithelial fate stem cell                  2303
transit amplifying cell                    1886
proliferating epithelial fate stem cell    1006
immature goblet cell                        933
proliferating transit amplifying cell       890
enterocyte                                  876
goblet cell                                 663
paneth cell                                 647
proliferating enterocyte progenitor         634
enteroendocrine cell                        325
enterocyte progenitor                       318
brush cell                                  271
immature enterocyte                         144
Name: celltype3, dtype: int64
https://github.com/theislab/single-cell-tutorial/blob/master/latest_notebook/Case-study_Mouse-intestinal-epithelium_1906.ipynb TA 2361 EP (early) 2246 Stem 2099 Goblet 1804 EP (stress) 1479 Enterocyte 1309 Paneth 646 Enteroendocrine 268 Tuft 245
In [67]:
#Our cell type labels
print(adata.shape)
adata.obs['leiden'].value_counts()
(10896, 1233)
Out[67]:
0     663
1     600
2     500
3     488
4     466
5     462
6     442
7     406
8     390
9     367
10    355
11    338
12    319
13    308
14    306
15    289
16    285
17    277
18    271
19    266
20    265
21    263
22    253
23    241
24    215
25    196
26    195
27    181
28    173
29    156
30    147
31    144
32    139
33    120
34    116
35    102
36     84
37     79
38     29
Name: leiden, dtype: int64
In [ ]:
 
In [68]:
# Annotate the data sets
adata.obs['barcode'] = [a.split('.')[1] for a in adata.obs_names]
In [69]:
adata_merged = adata.copy()
adata_merged.obs = adata.obs.merge(adata_pub.obs.drop_duplicates(subset=['barcode', 'donor']), how='left', on=['barcode', 'donor'], indicator=True)
AnnData expects .obs.index to contain strings, but your first indices are: Int64Index([0, 1], dtype='int64'), …
In [70]:
adata.obs.shape
Out[70]:
(10896, 17)
In [71]:
adata_pub.obs.shape
Out[71]:
(11665, 4)
In [72]:
adata_merged.obs.shape
Out[72]:
(10896, 20)
In [73]:
adata_merged.obs['_merge'].value_counts()
Out[73]:
both          10291
left_only       605
right_only        0
Name: _merge, dtype: int64
In [74]:
#adata_merged = bc.st.additional_labeling(adata_merged, 'cell_label', 'cell_label', 'Cell type annotation from autors', 'Haber et al 2017', outdir_data)
In [75]:
#results_file
adata_merged.write(input_data+'.annotated.h5ad')
... storing 'donor' as categorical
... storing 'region_y' as categorical
... storing 'cell_label' as categorical
In [76]:
adata_merged.obs.cell_label
Out[76]:
0            Paneth
1        Enterocyte
2                TA
3                TA
4              Stem
            ...    
10891            EP
10892    Enterocyte
10893        Goblet
10894        Goblet
10895    Enterocyte
Name: cell_label, Length: 10896, dtype: category
Categories (9, object): [EP, Enterocyte, Enteroendocrine, Goblet, ..., Stem, TA, Tuft, nan]
In [77]:
adata_merged = adata_merged.copy()
adata_merged = bc.subset_adata(adata_merged, adata_merged.obs.cell_label != 'nan', raw=False)
In [ ]:
 
In [78]:
sc.pl.umap(adata_merged, color=['cell_label'],legend_fontsize=6)
In [79]:
sc.pl.umap(adata_merged, color=['celltype0','celltype1', 'celltype2'], legend_loc='on data',legend_fontsize=6)
sc.pl.umap(adata_merged, color=['leiden','celltype3', 'cell_label'], legend_loc='on data',legend_fontsize=6)
In [80]:
sc.pl.tsne(adata_merged, color=['celltype0','celltype1', 'celltype2'], legend_loc='on data',legend_fontsize=6)
sc.pl.tsne(adata_merged, color=['leiden','celltype3', 'cell_label'], legend_loc='on data',legend_fontsize=6)
In [81]:
sc.pl.umap(adata_IMM_scores, color=['score_HumanCD45p_scseqCMs6_CCG2M_scanpy',
                                    'score_HumanCD45p_scseqCMs6_Stemmess_scanpy',
                                    ], legend_loc='on data',legend_fontsize=6)
sc.pl.umap(adata_anno_scores, color=['score_TAmplifying_scanpy',
                                     'score_EpithelialStem_scanpy',                                     
                                    ], legend_loc='on data',legend_fontsize=6)
In [ ]:
 
In [82]:
bc.pl.riverplot_2categories(adata_merged, ['celltype3', 'cell_label'])
In [83]:
bc.pl.riverplot_2categories(adata_merged, ['celltype3', 'leiden'])
In [84]:
bc.pl.riverplot_2categories(adata_merged, ['leiden', 'cell_label'])
In [ ]:
 
In [85]:
sc.pl.umap(adata_IMM_scores, color=['Tff3', 'Klk1', 'Gnb2l1'], legend_loc='on data',legend_fontsize=6)
In [86]:
sc.pl.umap(adata_IMM_scores, color=['Spink4', 'Ldhb', 'Lrrc26'], legend_loc='on data',legend_fontsize=6)
In [87]:
sc.pl.umap(adata_IMM_scores, color=['Urad', 'Ergic1'], legend_loc='on data',legend_fontsize=6)
In [88]:
sc.pl.umap(adata_IMM_scores, color=['Zkscan1', 'Anxa13', 'Foxa3'], legend_loc='on data',legend_fontsize=6)
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]: